using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Mapping.Attributes;

namespace Persistance.Model
{

    /**
     * Concern Specification
     * 
     * ConcernID (int) --> ID of the Concern
     * ConcernDescription (string) --> Describes the Concern in detail
     * Severity (varchar) --> Technically an enum of (Critical, Serious, Normal, Low). Kept it varchar in case they change it.
     * Priority (int) --> Technically an enum of (1, 2, 3, 4). Kept it int in case it changes.
     * AnalysisNeeded (string) --> Technically enum of (SA, DA, PA, PPA, POA, JDI). They may change this so I kept it as a string
     * HelpNeeded (string) --> Who's in charge of taking care of this concern?
     * 
     * */

    [Serializable]
    [Class]
    public class Concern
    {

        private int _concernID;
        //NHIBER: Setts the primary key to ID
        [Id(Name = "ConcernID")]
        [Generator(1, Class = "native")]
        public virtual int ConcernID
        {
            get { return _concernID; }
            set { _concernID = value; }
        }

        //Retrives the Situation that this Concern is associated with.
        private Situation _situation = new Situation();
        public virtual Situation Situation
        {
            get { return _situation; }
            set { _situation = value; }
        }

        private string _concernDesc;
        [Property(Type = "StringClob", Length = 5000)]
        public virtual string ConcernDescription
        {
            get { return _concernDesc; }
            set { _concernDesc = value; }
        }

        private string _severity;
        [Property(Length = 20)]
        public virtual string Severity
        {
            get { return _severity; }
            set { _severity = value; }
        }

        private int _priority;
        [Property(Type = ("int"))]
        public virtual int Priority
        {
            get { return _priority; }
            set { _priority = value; }
        }

        private string _analysisNeeded;
        [Property(Length = 15)]
        public virtual string AnalysisNeeded
        {
            get { return _analysisNeeded; }
            set { _analysisNeeded = value; }
        }

        private string _helpNeeded;
        [Property(Length = 250)]
        public virtual string HelpNeeded
        {
            get { return _helpNeeded; }
            set { _helpNeeded = value; }
        }
    }
}
